Use the new xen-python-path to set PYTHONPATH, rather than trying to do it in
authorEwan Mellor <ewan@xensource.com>
Thu, 1 Feb 2007 14:41:58 +0000 (14:41 +0000)
committerEwan Mellor <ewan@xensource.com>
Thu, 1 Feb 2007 14:41:58 +0000 (14:41 +0000)
XmTestLib.__init__ (and getting it wrong).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/xm-test/configure.ac
tools/xm-test/lib/XmTestLib/__init__.py

index ffbf146f34de60493b7bf5de68f4ed493ff9270a..d3c651a250aa2aaedf9ff4aecde2b5a5bf931cb3 100644 (file)
@@ -11,10 +11,12 @@ AC_PROG_CC
 #AC_PROG_INSTALL
 AC_CHECK_PROG([LILO],  lilo,   lilo,   "no",   [$PATH])
 
+XEN_PYTHON_PATH=$(/usr/sbin/xen-python-path)
+
 # Right now, we can assume that the lib/ directory
 # is two levels above the tests
 TESTLIB=../../lib
-TENV="PYTHONPATH=$PYTHONPATH:$TESTLIB"
+TENV="PYTHONPATH=$PYTHONPATH:$TESTLIB:$XEN_PYTHON_PATH"
 
 AC_ARG_ENABLE(hvm-support,
        [[  --enable-hvm-support           enable hardware virtual machine assist]],
index f638003b08f3e41aa5e4e3941b05af7cc0500594..40aacf7ecdcef80930eade1fa760e6ef9a0bbb04 100644 (file)
@@ -3,26 +3,6 @@
 # Author: Dan Smith <danms@us.ibm.com>
 #
 
-import os.path
-import sys
-
-# Use the auxbin module in Xend to determine the correct Python path.  We
-# take the first installed instance of auxbin that we find, and then run it
-# to determine the correct path, appending that to sys.path.
-
-AUXBIN = 'xen/util/auxbin.py'
-
-for p in ['python%s' % sys.version[:3], 'python']:
-    for l in ['/usr/lib64', '/usr/lib']:
-        d = os.path.join(l, p)
-        if os.path.exists(os.path.join(d, AUXBIN)):
-            sys.path.append(d)
-            import xen.util.auxbin
-            libpath = xen.util.auxbin.libpath()
-            sys.path = sys.path[:-1]
-            sys.path.append(libpath)
-            break
-
 from Console import *
 from Test import *
 from Xm import *